<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>微信设置</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  
    {include file="public/css"}
    {include file="public/js"}
</head>
<body>

<!-- 后台面包导航 -->
{:get_admin_breadcrumb()}
<blockquote class="layui-elem-quote" style="margin-top:10px;">说明：配置微信端基本信息</blockquote>

<form class="layui-form" action="">
<input type="hidden"  name="groupname" value="{$Request.action}">

<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
  <ul class="layui-tab-title">
    <li class="layui-this">基本设置</li>
    <li >回复设置</li>
  </ul>

  <div class="layui-tab-content">

<div class="layui-tab-item layui-show">
      <div class="layui-form-item">
        <label class="layui-form-label">开发者ID(AppID)</label>
        <div class="layui-input-inline">
          <input type="text" name="data[appid]" lay-verify="title" autocomplete="off" placeholder="" class="layui-input"  value="{$settings.weixin.appid}">
        </div>
      </div>

      <div class="layui-form-item">
        <label class="layui-form-label">开发者密码(AppSecret)</label>
        <div class="layui-input-inline">
          <input type="password" name="data[appsecret]" lay-verify="title" autocomplete="off" placeholder="" class="layui-input" value="{$settings.weixin.appsecret}">
        </div>
      </div>

      <div class="layui-form-item">
        <label class="layui-form-label">服务器地址(URL)</label>
        <div class="layui-input-inline">
          <input type="text" name="data[url]" lay-verify="title" autocomplete="off" placeholder="" class="layui-input" value="{$settings.weixin.url}">
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">令牌(Token)</label>
        <div class="layui-input-inline">
          <input type="text" name="data[token]" lay-verify="title" autocomplete="off" placeholder="" class="layui-input" value="{$settings.weixin.token}">
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">公众微信号</label>
        <div class="layui-input-inline">
          <input type="text" name="data[account]" lay-verify="title" autocomplete="off" placeholder="" class="layui-input" value="{$settings.weixin.account}">
        </div>
      </div>

</div>


<div class="layui-tab-item">

      <div class="layui-form-item">
        <label class="layui-form-label">收到消息回复</label>
        <div class="layui-input-inline">
        
          <textarea  name="data[msg_replay]" lay-verify="title" autocomplete="off" placeholder="" class="layui-textarea">{$settings.weixin.msg_replay}</textarea>
        </div>
      </div>


      <div class="layui-form-item">
        <label class="layui-form-label">被关注回复</label>
        <div class="layui-input-inline">
          <textarea  name="data[follow_reply]" lay-verify="title" autocomplete="off" placeholder="" class="layui-textarea">{$settings.weixin.follow_reply}</textarea>
        </div>
      </div>


</div>
           <div class="layui-form-item">
            <label class="layui-form-label"></label>
              <div class="layui-input-block">
                  <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="form">确 定</button>
              </div>
            </div>
  </div>

</div> 

</form>

<script>
layui.use('form', function(){
  var form = layui.form;
  
  //监听提交
  form.on('submit(form)', function(data){
    var data =data.field;
    $.post("{:url('settings/update')}",data,function(json){
       if(json.code == 0){
           layer.msg(json.msg);
       }else if(json.code == -1){
           layer.msg(json.msg);
       }
    });
    return false;
  });
});
</script>


</body>

</html>